home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / g_quake / anticamp.zip / ANTICAMP.TXT < prev    next >
Text File  |  1996-10-13  |  10KB  |  210 lines

  1.               AntiCamper  v1.0
  2.                  by Harlequin
  3.             (dtebben@alumni.caltech.edu)
  4.  
  5. How It Works
  6. ------------
  7. All items which are tagged as camper-sensitive, which by default
  8. include the rocket launcher, grenade launcher, quad damage, red armor,
  9. and lightning gun, look around themselves about every 8 seconds.  They
  10. have two detection ranges: a long range that includes only the item's
  11. line-of-sight, and a shorter range that can detect players even without
  12. LOS.  If a player is detected for two consecutive think times, they are
  13. issued a warning of the form "**CAMPER WARNING FROM (item name)", their 
  14. screen flashes and a sound is played.  If they are still within detection
  15. range for a third think time, they are identified as a camper. All their
  16. armor and defensive powerups are removed, they are paralyzed, and their
  17. health is set to 1.  A message is then sent to all players in the game,
  18. telling them who and where the camper is.  The first player to frag the
  19. camper gets 3 frags instead of the normal 1, hopefully precipitating a
  20. free-for-all as everyone heads for the helpless camper.  Campers also
  21. lose 2 frags each time they are busted.
  22.  
  23. AntiCamper works only in deathmatch mode 1 (the standard DM mode where
  24. weapons respawn).  Item respawn noises for camper-sensitive items have
  25. been disabled, simply because they help to alert campers that the item
  26. they're guarding is available again.  Items detect campers even if the
  27. item is not currently respawned (it's still there, you just can't see
  28. or touch it).  Item respawn times for camper-sensitive things are
  29. somewhat erratic, +/- 4 seconds or so, while this mod is running.  This
  30. is an unavoidable consequence of giving items think times -- I see it
  31. as a feature rather than a bug, because it makes camping that much
  32. harder.
  33.  
  34. When a client connects to a server that is running AntiCamper, they
  35. are informed of its presence via a centerprinted message.
  36.  
  37.  
  38. How To Install AntiCamper
  39. -------------------------
  40. To install AntiCamper, you must have QCCDOS, the DOS-based QuakeC
  41. compiler; try looking at the following places if you don't have QCC:
  42.     ftp://ftp.cdrom.com/pub/idgames/idstuff/source
  43.     ftp://ftp.cdrom.com/pub/idgames2/quakec
  44.     ftp://ftp.cdrom.com/pub/idgames2/utils
  45.  
  46. Make a new subdir named "anticamp" off of your Quake directory and copy
  47. all the files from V101QC (a subdirectory of QCC) into it.  Now unzip
  48. anticamp.zip into the new anticamp subdir, answering "yes to all" if it
  49. asks you whether or not to overwrite files.  Enter the subdir and run
  50. QCCDOS.  A file will be created called "progs.dat", which is what Quake
  51. looks for.  To use the mod, run Quake with "-game anticamp".
  52.  
  53. To recompile AntiCamper later on, just run QCCDOS again (after making
  54. any desired changes to the code -- see Optional Settings).
  55.  
  56.  
  57. Optional Settings
  58. -----------------
  59. You don't have to change any of this stuff if you just want to use
  60. the defaults.  But for those who (like me) are never satisfied until
  61. they have tweaked something to perfection, read on.
  62.  
  63. NOTE: All of these involve recompiling AntiCamper to generate a new
  64. progs.dat.  For instructions on how to do this, see "How To Install".
  65. ALSO, some settings require the user to "comment out" lines of code.
  66. This is done by putting two forward slashes // at the start of the
  67. line you wish to remove, using a text editor.  DON'T delete any code,
  68. in case you want to restore the original setting later.
  69.  
  70. *Item respawn sounds for camper-sensitive items can be enabled.  I hate
  71. these personally, but I know some people like them.  Just comment out
  72. line 12 in items.qc.
  73.  
  74. *Camper/sniper warning sounds can be turned off.  I'm not totally sure
  75. these are a good idea; they can give away a player's position in a
  76. deathmatch.  On the other hand, they make sure that the player notices
  77. the warning.  If you don't want to use them, you need to comment out
  78. lines 190 and 236 in anticamp.qc.  The camper warning uses a barking-dog
  79. sound, and the sniper warning is the Ogre starting his chainsaw.
  80.  
  81. *All weapons, armor, and powerups can be tagged as camper-sensitive by
  82. modifying lines 44-57 in items.qc.
  83.  
  84. *Item detection radii can be assigned to maps on an individual basis.
  85. For instance, if there's one map where players are getting "false
  86. positives" (i.e. busted even though they weren't camping), you could
  87. decrease all items' detection zones for that level.  Instructions on
  88. how to do this are in lines 66-74 and 91-97 in anticamp.qc.
  89.  
  90. *Item think times can also be set differently for each level.  Info on
  91. how this is accomplished can be found in lines 116-118 of anticamp.qc.
  92. Altering think times is the most powerful way to increase/decrease
  93. camper sensitivity on a level.
  94.  
  95. *The connection message may be disabled by commenting out line 1018
  96. in client.qc.
  97.  
  98. Please send me feedback about what settings work well in deathmatch!
  99. If I get enough suggestions, I will change the defaults in the next
  100. version of AntiCamper.
  101.  
  102.  
  103. AntiSniper
  104. ----------
  105. Also included in this mod is AntiSniper, a piece of code that lets you
  106. eliminate sniping on home-brewed maps.  AntiSniper searches the map
  107. for a special entity called a sniper detector, and if it finds any,
  108. it causes them to act like camper-sensitive items.  They search the
  109. area around themselves, and if the same player is loitering for too
  110. long they issue a sniper warning, then kill them as per AntiCamper.
  111. AntiSniper is totally optional; if it doesn't find any sniper-detection
  112. points on the map, it shuts itself down.  Note: try not to let sniper
  113. detectors overlap detection radii, or they tend to cancel each other
  114. out within the zone of overlap.
  115.  
  116. To take advantage of AntiSniper, you must create or modify a map so
  117. that it has sniper detectors.  Sniper detectors are entities with
  118. classname 'info_null' and targetname 'sniper_detector'.  They can be
  119. customized by setting various fields: 'speed' determines the distance
  120. they can see players from if they have line-of-sight, 'count' is their
  121. sighting distance without LOS, 'dmg' is their average think time (this
  122. varies to +/- 0.5 seconds), and 'message' is the string printed in
  123. warnings and busts.  Set these fields in your map editor;  if it
  124. doesn't support them, you'll have to text-edit the .map file manually.
  125.  
  126. Sample .map entry for a sniper-detection point:
  127. {
  128. "classname" "info_null"
  129. "targetname" "sniper_detector"
  130. "message" "YOSEMITE"
  131. "speed" "600"
  132. "count" "150"
  133. "dmg" "6"
  134. "origin" "176 80 -168"
  135. }
  136.  
  137. This would make a sniper detector located at coordinates '176 80 -168'
  138. with LOS range 600 and no-LOS range 150, which checks for snipers every
  139. 5.5-6.5 seconds.  If it busted somebody it would bprint "x IS CAMPING AT
  140. YOSEMITE", and it issues warnings in the form "**SNIPER WARNING FROM
  141. YOSEMITE".  You should set the message string to make it as unambiguous
  142. as possible, e.g. "THE TOP PLATFORM".
  143.  
  144. You don't need to set all of these fields if you wish to use the
  145. default values.  The defaults are:
  146.   warning string: (**SNIPER WARNING FROM) "SNIPER DETECTOR"
  147.   LOS detection range: 800
  148.   no-LOS range: 250
  149.   average think time: 8
  150. But you do have to set the classname, targetname, and origin fields.
  151.  
  152. Why did I use the info_null entity instead of just making my own?
  153. Well, I tried that, but if you run the resulting map without AntiCamper,
  154. Quake gives you all sorts of ugly error messages because it doesn't
  155. have a spawn function for sniper detectors.  I figured info_null was
  156. pretty safe.  AFAIK it has no effect on lighting or gameplay.  However,
  157. if you want to use them, AntiSniper will detect and use map entities
  158. with classname "sniper_detector" (although the targetname must also be
  159. set to "sniper_detector").  Just be aware that if you use these instead
  160. of info_null, running the map without AntiCamper will generate a lot of
  161. garbage upon worldspawn.
  162.  
  163.  
  164. Integrating AntiCamper Into an Existing Mod Package
  165. ---------------------------------------------------
  166. I designed AntiCamper to be as modular as possible.  All you have to do
  167. in order to bundle it into your own servermod code is the following:
  168.  
  169. 1) Include anticamp.qc in your progs.src.  Put it right above items.qc.
  170. 2) Look through the file changes.txt, where I documented all my mods.
  171. 3) Cut and paste my code from defs.qc, items.qc, client.qc, and misc.qc
  172.    into the same places in your own files.  Any place that I made
  173.    additions to id's code I put the comment //#Harlequin# and a brief
  174.    description of the addition.  I didn't remove any of the original
  175.    code (but I did alter some of it, so check carefully).
  176.  
  177. I encourage other coders to use my work, and I will be happy to address
  178. any questions/comments/problems/feedback you might have.  Email me at:
  179. dtebben@alumni.caltech.edu.
  180.  
  181.  
  182. Known Bugs
  183. ----------
  184. None.
  185.  
  186.  
  187. Copyright and Distribution Information
  188. --------------------------------------
  189. This program is free software; you can redistribute it and/or modify it
  190. under the terms of the GNU General Public License as published by the Free
  191. Software Foundation; either version 2 of the License, or (at your option)
  192. any later version.
  193.  
  194. This program is distributed in the hope that it will be useful, but
  195. WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
  196. or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  197. for more details.
  198.  
  199. For a copy of the GNU General Public License, write to the Free Software
  200. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  201.  
  202.  
  203. Credits
  204. -------
  205. id Software, for setting the trend of user-configurable games, elevating
  206. shareware to its rightful place, and consistently being the best at what
  207. they do.
  208.  
  209. Jonathan Jessup (jjessup@visuallink.com), for early ideas and playtesting.
  210.